import request from "@/utils/request";
enum API {
  HOSPITALDETAIL_URL = "/hosp/hospital/",
  //获取某一个医院科室的数据
  HOPSPITALDEPARTMENT_URL = "/hosp/hospital/department/",
  //获取验证码接口
  GETUSERCODE_URL = "/sms/send/",
  //用户登录接口
  USERLOGIN_URL = "/user/login",
  //获取微信扫码登陆需要的参数
  WXLOGIN_URL = "/user/weixin/getLoginParam/",
  //获取某一个医院的某一个科室预约挂号数据
  HOSPITALWORK_URL = "/hosp/hospital/auth/getBookingScheduleRule/",
  //获取医院某一个科室某一天相应医生排班的数据
  HOSPITALDOCTOR_URL = "/hosp/hospital/auth/findScheduleList/",
  //获取某一个账号下就诊人的信息
  GETUSER_URL = "/user/patient/auth/findAll",
  //获取挂号医生的信息
  GETDOCTOR_URL = "/hosp/hospital/getSchedule/",
}
//预约详情页接口
export const reqHospitalDetail = (hoscode: string) =>
  request.get(API.HOSPITALDETAIL_URL + hoscode);
//获取医院可是的接口
export const reqHospitalDepartment = (hoscode: string) =>
  request.get(API.HOPSPITALDEPARTMENT_URL + hoscode);
//获取验证码接口
export const reqCode = (phone: string) =>
  request.get(API.GETUSERCODE_URL + phone);
//用户登录接口
export const reqUserLogin = (data: any) =>
  request.post(API.USERLOGIN_URL, data);
//获取微信扫码登录生成二维码需要参数接口
export const reqWxLogin = (wxRedirectUri: string) =>
  request.get(API.WXLOGIN_URL + `?wxRedirectUri=${wxRedirectUri}`);
//获取预约挂号的数据
export const reqHospitalWork = (
  page: number,
  limit: number,
  hoscode: string,
  depcode: string
) =>
  request.get(API.HOSPITALWORK_URL + `${page}/${limit}/${hoscode}/${depcode}`);
//获取医生排班的数据
export const reqHospitalDoctor = (
  hoscode: string,
  depcode: string,
  workDate: string
) => request.get(API.HOSPITALDOCTOR_URL + `${hoscode}/${depcode}/${workDate}`);
//获取某一个账号下就诊人的信息
export const reqGetUser = () => request.get(API.GETUSER_URL);
//获取挂号医生的信息
export const reqGetDoctor=(scheduleID:string)=>request.get(API.GETDOCTOR_URL+scheduleID)